import '@/assets/css/main.scss'
// 导入字体图标样式
import '@/assets/fonts/iconfont.css'
import 'animate.css';
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

// 引入pinia
import { createPinia } from 'pinia'

import App from './App.vue'
import router from './router'

import mitt from 'mitt'

const Mit = mitt()


const pinia = createPinia()
const app = createApp(App, {
    productionTip: false,
})

app.use(pinia)
app.use(router)

console.log('process.env.NODE_ENV', process.env.NODE_ENV)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

declare module 'vue' {
    export interface ComponentCustomProperties {
        $Bus: typeof Mit
    }
}
app.config.globalProperties.$Bus = Mit

app.mount('#app')
